package com.example.myapplication.a_class.a01_open

/**
 * 父类-有主构造函数
 * 一个类如果想要被继承,必须添加 open 关键字,属性和方法也必须加
 */
open class Father constructor(var fatherName:String) {

    constructor(fatherName: String,fatherAge : Int) : this(fatherName)

    var fatherAttribute : String = ""

    open fun fatherFun(){
        println("Father.fatherFun")
    }
}

